package main

import (
	"encoding/json"
	"fmt"
)

type Point struct {
	X int
	Y int
}

func main() {
	p := Point{0, 5}

	//无缩进
	bytes, _ := json.Marshal(&p)

	//带缩进
	//bytes, _ := json.MarshalIndent(&p, "", "  ")


	fmt.Println(string(bytes))
}

